package com.wl.controller;

import com.wl.domain.User;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

/**
 * 测试接口
 */
@RestController
@RequestMapping("user")
public class UserController {
    //获取yml里面的url
    @Value("${server.port}")
    //测试
    private String port;
    @GetMapping("userById/{id}")
    public User userById(@PathVariable("id") Long id){
        return new User(id,"吊炸天","gai"+port);
    }
}
